<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li ><a href="{:U('Ads/index')}">图片列表</a></li>
			<li class="active"><a >编辑</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="{:U('Ads/edit_post')}">
		   <input type="hidden" name="id" value="{$ads['id']}">
			<fieldset>
				<div class="control-group">
					<label class="control-label">图片分类</label>
					<div class="controls">
						<select name="sid">
						    <option value="0">默认分类</option>
						   <volist name="ads_sort" id="vo">
							     <option value="{$key}" <if condition="$ads['sid'] eq $key">selected</if> >{$vo}</option>
							 </volist>					 
						</select>
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">序号</label>
					<div class="controls">
						<input type="text" name="orderno" value="{$ads['orderno']}">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">图片名称</label>
					<div class="controls">
						<input type="text" name="name" value="{$ads['name']}">
						<span class="form-required">*</span>
					</div>
				</div>

				<div class="control-group">
					<label class="control-label">图片</label>
					<div class="controls">
								<div >
									<input type="hidden" name="thumb" id="thumb2" value="{$ads['thumb']}">
									<a href="javascript:void(0);" onclick="flashupload('thumb_images', '附件上传','thumb2',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
											<if condition="$ads['thumb'] neq ''">
														<img src="{$ads['thumb']}" id="thumb2_preview" width="135" style="cursor: hand" />
												<else/>
														<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb2_preview" width="135" style="cursor: hand" />
												</if>
									</a>
									<input type="button" class="btn btn-small" onclick="$('#thumb2_preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb2').val('');return false;" value="取消图片">
								</div>
						<span class="form-required"></span>
					</div>
				</div>
				
				<div class="control-group">
					<label class="control-label">跳转链接</label>
					<div class="controls">
						<input type="text" name="url" value="{$ads['url']}">

					</div>
				</div>
				
				<div class="control-group">
					<label class="control-label">描述</label>
					<div class="controls">
						<textarea name="des" rows="2" cols="20" id="signature" class="inputtext" style="height: 100px; width: 500px;">{$ads['des']}</textarea>
	
					</div>
				</div>				
			</fieldset>
			<div class="form-actions">
				<button type="submit" class="btn btn-primary js-ajax-submit">{:L('EDIT')}</button>
				<a class="btn" href="{:U('Ads/index')}">{:L('BACK')}</a>
			</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
</body>
</html>